
package pl.com.qapps.unity;

import java.util.concurrent.TimeUnit;

import pl.com.qapps.unity.NotifyOsd.Notification;
import pl.com.qapps.unity.NotifyOsd.StockIcon;

/**
 * @author Jakub Dykowski
 *
 */
public class TestNotifyOsd {

	/**
	/**
	 * @param args
	 * @throws InterruptedException
	 */
	public static void main(String[] args) throws InterruptedException {

		Notification test = new Notification("Icon test", "",
				StockIcon.MESSAGE_IM);
		test.show();
		TimeUnit.SECONDS.sleep(3);
		int count = 0;
		for (StockIcon icon : StockIcon.values()) {
			count++;
			test.setBody(icon.toString()).setIcon(icon);
			test.show();
			if (count > 50)
				TimeUnit.SECONDS.sleep(1);
			else
				TimeUnit.MILLISECONDS.sleep(50);
		}

		Notification n = new Notification("Cole Raby", "jakis tekst",
				StockIcon.MESSAGE_EMAIL).show();
		TimeUnit.SECONDS.sleep(3);
		NotifyOsd.notify("Cole Raby", "dodana zawartość do powiadomienia",
				StockIcon.DiALOG_INFORMATION);

		TimeUnit.SECONDS.sleep(3);
		long start = System.currentTimeMillis();
		n.setSummary("Wiadomość od Artur:").setBody("blablablablabla blablabla i bla").setIcon("kadu");
		long stop = System.currentTimeMillis();
		System.out.println("delay: " + (stop - start));
		TimeUnit.SECONDS.sleep(3);

		NotifyOsd.notify("summary only", null, StockIcon.AUDIO_PLAY);
	}

}
